import { message } from "antd";

export function copyToClip(content, mes) {
  var aux = document.createElement("input");
  aux.setAttribute("value", content);
  document.body.appendChild(aux);
  aux.select();
  document.execCommand("copy");
  document.body.removeChild(aux);
  if (mes == null) {
    message.success("复制成功");
  } else {
    message.success(mes);
  }
}
